package com.hq.fxh.No6UerSpace.Adapter;

import android.app.Activity;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.hq.fxh.R;
import com.hq.fxh.Utils.AppConstant;
import com.hq.fxh.Utils.DensityUtils;
import com.hq.fxh.Utils.GlideUtils;
import com.hq.fxh.Utils.SystemUtils;
import com.hq.fxh.Utils.Tool;

/**
 * /**
 *
 * @author 薛
 * @ClassName
 * @Description :
 * @Created 2017/9/20
 * @Email xlwenhao1858@sina.com
 */


public class Radapter_UserSpace_ZhaoPin extends RecyclerView.Adapter<Radapter_UserSpace_ZhaoPin.ZPViewHolder> {


    Context context;


    @Override
    public ZPViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        context = parent.getContext();

        ZPViewHolder canPinViewHolder = new ZPViewHolder(View.inflate(context, R.layout.item_myplate_zaopin, null));


        return canPinViewHolder;
    }

    @Override
    public void onBindViewHolder(ZPViewHolder holder, int position) {

    }

    @Override
    public int getItemViewType(int position) {
        if (position % 2 == 0) {

            return 1;
        } else {
            return 0;
        }
    }

    @Override
    public int getItemCount() {
        return 10;
    }


    class ZPViewHolder extends RecyclerView.ViewHolder {
        protected View rootView;
        protected TextView zhaoPinItemName;
        protected TextView zhaoPinItemMoney;
        protected TextView zhaoPinItemNameAddress;
        protected TextView zhaoPinItemNameWorkTime;
        protected TextView zhaoPinItemNameXueLi;

        public ZPViewHolder(View itemView) {
            super(itemView);
            initView(itemView);
        }


        private void initView(View rootView) {
            zhaoPinItemName = (TextView) rootView.findViewById(R.id.zhaoPin_item_Name);
            zhaoPinItemMoney = (TextView) rootView.findViewById(R.id.zhaoPin_item_Money);
            zhaoPinItemNameAddress = (TextView) rootView.findViewById(R.id.zhaoPin_item_Name_Address);
            zhaoPinItemNameWorkTime = (TextView) rootView.findViewById(R.id.zhaoPin_item_Name_WorkTime);
            zhaoPinItemNameXueLi = (TextView) rootView.findViewById(R.id.zhaoPin_item_Name_XueLi);

        }
    }


}
